# !/usr/bin/env python
# -*-coding:utf-8 -*-

"""
# File       : result.py
# Time       ：2022/11/20 14:49
# Author     ：hhs
# version    ：python 3.6
# Description：统一结果返回
"""
from rest_framework.response import Response


def success(msg="success", data=None):
    return Response({"code": 200, "msg": msg, "data": data})


def fail(msg="fail"):
    return Response({"code": 400, "msg": msg, "data": None})
